<template>
  <view class="index">
    <!-- 仪表盘 -->
    <dashboard></dashboard>
    <!-- navbar -->
    <!-- main -->
    <!-- tabbar -->
    <AtTabBar
      fixed
      backgroundColor="#ececec"
      color="#4d5154"
      selectedColor="#9E8962"
      fontSize="12"
      :tabList="tabList"
      :onClick="handleClick"
      :current="current"
    />
  </view>
</template>

<script>
import { AtTabBar } from "taro-ui-vue";
import Dashboard from '../components/dashboard/index'
import "./index.scss";

export default {
  data() {
    return {
      msg: "Hello world!",
      current: 0,
      tabList: [
        { title: "主页", iconType: "home" },
        { title: "精选", iconType: "sketch" },
        { title: "攻略", iconType: "tags" },
        { title: "个人", iconType: "user", text: "100", max: 99 }
      ]
    };
  },
  components: {
    AtTabBar,
    Dashboard
  },
  methods: {
    handleClick(value) {
      this.current = value;
    }
  }
};
</script>
